import http from "../utils/http";
//=================运维管理Api==========================================
const mochaApi = {
    //--------------------------------设备运行日志页面
    //设备运行日志获取表格数据
    geteOperation() {
        return http({
            url: '/operations/EquipmentLog/selectAllEquipmentLog',
            method: 'get'
        })
    },
    //设备运行日志多条件查询
    queryOperation(data) {
        return http({
            url: '/operations/EquipmentLog/selectEquipmentLogByConditions',
            method: 'post',
            data
        })
    },
    //------------------------------------------------------------------------------
    //--------------------------------设备状态监控
    //获取所有数据
    getEquipment() {
        return http({
            url: '/operations/equipmentManage/selectAllEquipment',
            method: 'get'
        })
    },
    //查询
    queryEquipment(data) {
        return http({
            url: '/operations/equipmentManage/selectEquipmentByConditions',
            method: 'post',
            data
        })
    },
    //查询某个设备的所有报警信息
    getTableBtn(id) {
        return http({
            url: '/operations/equipmentManage/selectAllWarning',
            method: 'get',
            params: { equipmentId: id }
        })
    },
    //下拉框获取用户名
    getUserName() {
        return http({
            url: '/operations/equipmentManage/memberList',
            method: 'get',
        })
    },
    //立即处理----确定
    immediateProcessing(data) {
        return http({
            url: '/operations/equipmentManage/resolveWarning',
            method: 'post',
            data
        })
    },
    //-------------------------------------------------------------------------------------
    //--------------------------------停车场系统
    //获取数据
    getStopData() {
        return http({
            url: '/operations/parkingManage/selectAllParking',
            method: 'get',
        })
    },
    //停车场系统--修改
    stopModify(data) {
        return http({
            url: '/operations/parkingManage/updateParking',
            method: 'post',
            data,
        })
    },
    //停车场系统--删除停
    stopDelete(id) {
        return http({
            url: '/operations/parkingManage/deleteParking',
            method: 'get',
            params: {
                parkingId: id
            }
        })
    },
    stopQuery(data) {
        return http({
            url: '/operations/parkingManage/selectParkingByConditions',
            method: 'post',
            data
        })
    },
    //停车场系统==========新增页面--------------------------
    //停车场系统新建页--获取数据
    getStopAdd() {
        return http({
            url: '/operations/parkingManage/selectAllInfo',
            method: 'get',
        })
    },
    //停车场系统新建页---查询
    addQuery(value) {
        return http({
            url: '/operations/parkingManage/selectAllInfoByName',
            method: 'get',
            params: {
                parkingName: value
            }
        })
    },
    //停车场系统新建页---新增停车场
    addParkingLot(data) {
        return http({
            url: '/operations/parkingManage/addParking',
            method: 'post',
            data,
        })
    },
    //停车场系统新建页---新增通道
    addPassageway(data) {
        return http({
            url: '/operations/parkingManage/addPass',
            method: 'post',
            data,
        })
    },
    //停车场系统新建页---新增设备
    addEquipment(data) {
        return http({
            url: '/operations/parkingManage/addEquipment',
            method: 'post',
            data,
        })
    },
    //停车场系统新建页--删除通道
    stopDeletePassageway(id) {
        return http({
            url: '/operations/parkingManage/deletePass',
            method: 'get',
            params: {
                passId: id
            }
        })
    },
    //停车场系统新建页--删除设备
    stopDeleteEquipment(id) {
        return http({
            url: '/operations/parkingManage/deleteEquipment',
            method: 'get',
            params: {
                equipmentId: id
            }
        })
    },
    //停车场系统新建页--修改停车场
    stopQueryCar(data) {
        return http({
            url: '/operations/parkingManage/updateParking',
            method: 'post',
            data
        })
    },
    //停车场系统新建页--修改通道
    stopQueryPass(data) {
        return http({
            url: '/operations/parkingManage/updatePass',
            method: 'post',
            data
        })
    },
    //停车场系统新建页--修改设备
    stopQueryEquipment(data) {
        return http({
            url: '/operations/parkingManage/updateEquipment',
            method: 'post',
            data
        })
    }
}

export default mochaApi